package com.nineclock.sign;

import lombok.SneakyThrows;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.text.SimpleDateFormat;
import java.util.Date;

@SpringBootTest
@RunWith(SpringRunner.class)
public class etetetetet {
    @SneakyThrows
    @Test
    public void test0(){
        String a="2019-09-26 15:33:19";
        Date date = (Date) new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(a);
        SimpleDateFormat df = new SimpleDateFormat("yyyyMMddHHmmss");//设置日期格式
        System.out.println(df.format(date));

    }
}
